import { createRouter, createWebHistory } from "vue-router"
import routes from "./routes"
var router = createRouter({
    history: createWebHistory('/h5'),
    // history: createWebHistory(),
    routes,
    scrollBehavior(to, from, savedPosition) {
        return { top: 0 };
    }
})

router.beforeEach((to, from, next) => {
    window.document.title = to.meta.title
    next()
})

export default router